﻿<BaseControl:DialogControl x:Class="jSLApp.Client.Forms.Chat"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                         xmlns:BaseControl="clr-namespace:jSLCore.Client.Presentation.BaseControl;assembly=jSLCore.Client.Presentation" 
                         xmlns:tk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" 
                         xmlns:Selection="clr-namespace:jSLCore.Client.Presentation.BaseControl.Selection;assembly=jSLCore.Client.Presentation" 
                         xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
                         xmlns:BaseConverters="clr-namespace:jSLCore.Client.Presentation.jBinding.BaseConverters;assembly=jSLCore.Client.Presentation" xmlns:Controls1="clr-namespace:jSLCore.Client.Presentation.Controls;assembly=jSLCore.Client.Presentation" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <tk:DockPanel LastChildFill="True">
        <tk:DockPanel LastChildFill="True" tk:DockPanel.Dock="Bottom">
            <Button Content="Отправить" Click="send_Clicked" tk:DockPanel.Dock="Right"/>            
            <TextBox MinWidth="60" Name="txt" KeyUp="key_up"/>                        
        </tk:DockPanel>
        <Controls1:HelpBox tk:DockPanel.Dock="Top" Text="Что бы отключить всплывающие окна чата перейдите на страницу профиля"/>
        <Selection:jSLGrid x:Name="grid" IsReadOnly="True" CanUserResizeColumns="False" HeadersVisibility="None">
            <Selection:jSLGrid.Columns>
                <Controls:DataGridTemplateColumn Width="*">
                    <Controls:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <tk:DockPanel LastChildFill="True">
                                <HyperlinkButton Tag="{Binding Creator}" Click="gotoUser_Clicked" tk:DockPanel.Dock="Left" VerticalAlignment="Top">
                                	<HyperlinkButton.Content>
                                        <Binding Path="CreatorNameTxt" >
                                            <Binding.Converter>
                                                <BaseConverters:jAddTextConverter AddText=":" Mode="Suffix"/>
                                            </Binding.Converter>
                                        </Binding>
                                    </HyperlinkButton.Content>
                                </HyperlinkButton>
                            	<TextBlock TextWrapping="Wrap" Text="{Binding Text}"/>
                            </tk:DockPanel>
                        </DataTemplate>
                    </Controls:DataGridTemplateColumn.CellTemplate>
                </Controls:DataGridTemplateColumn>
            </Selection:jSLGrid.Columns>
        </Selection:jSLGrid>
    </tk:DockPanel>
</BaseControl:DialogControl>
